package com.rtx.edi.platform.rule.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rtx.edi.platform.rule.bean.UpdRule;
import com.rtx.edi.platform.rule.mapper.UpdRuleMapper;
import com.rtx.edi.platform.rule.service.UpdRuleService;

@Service
public class UpdRuleServiceImpl extends ServiceImpl<UpdRuleMapper, UpdRule> implements UpdRuleService{

	@Override
	public void selectList(Page<UpdRule> pageParam, UpdRule dto) {
		LambdaQueryWrapper<UpdRule> qw = Wrappers.lambdaQuery();
		qw.like(dto.getName() != null,UpdRule::getName, dto.getName());
		qw.like(dto.getExistquerycolumns() != null,UpdRule::getExistquerycolumns, dto.getExistquerycolumns());
		qw.like(dto.getBeanname() != null,UpdRule::getBeanname, dto.getBeanname());
		qw.like(dto.getExistquerysql() != null,UpdRule::getExistquerysql, dto.getExistquerysql());
		baseMapper.selectPage(pageParam, qw);
	}
}
